package global.io;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

public class WriteFile {
	private String path;
	private Scanner a;
	public void writefile(String path){
		this.path=path;
	}
	public WriteFile(){
		try {
			System.out.println("nhap vao duong dan file can ghi");
			a = new Scanner(System.in);
			this.path=a.nextLine();
            File file1=new File(this.path);
            file1.createNewFile();
            FileWriter fw=new FileWriter(file1);
            BufferedWriter bw=new BufferedWriter(fw);
            String s="";
            bw.write(s);
            bw.close();
            fw.close();
        } catch (IOException ex) {
            Logger.getLogger(WriteFile.class.getName()).log(Level.SEVERE, null, ex);
        }
	}

}
